# Update AI agent profile

Creates or replaces AI agent configuration profile within the specified scope. Payload may reset modelId to null and tools/triggers to empty lists; uploadIds controls attached documents. Budgets/rate limits can be set to null to remove limits.

RBAC:
- requires ANY of AIAgents.Manage, GroupAIAgents.Manage

Endpoint: PUT /api/v1/ai-agents/{agentId}/profile
Version: 1.0
Security: header

## Path parameters:

  - `agentId` (string, required)
    UUID with type prefix
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

## Query parameters:

  - `scope` (string, required)
    Scope: 'global' or group TypeId

## Request fields (application/json):

  - `tools` (array)
    List of tools enabled for this bot
    Enum: "VECTOR_SEARCH", "REGULAR_SEARCH", "ENTITY_SEARCH", "WEB_SEARCH", "POSTS_SINCE_LAST_INVOCATION", "POSTS_IN_TIME_RANGE", "LIST_GROUP_STRUCTURE", "REPLY", "LIKE", "REPORT", "QUOTE", "CREATE_OR_UPDATE_POST", "GENERATE_IMAGES", "REPORT_CONTENT", "ADD_REPORT_NOTE", "API_ACCESS"

  - `triggers` (array)
    Configured triggers for this bot

  - `triggers.type` (string, required)
    Trigger type
    Enum: "POST_CREATED", "REPLY_CREATED", "POST_EDITED", "MENTIONED", "QUESTION_DETECTED", "KEYWORD_MATCH", "INTENT_MATCH", "REPORTED_CONTENT", "THRESHOLD", "UNANSWERED", "CRON", "NEW_GROUP_MEMBER", "DIRECT_REPLY"

  - `triggers.prompt` (string,null)
    Optional trigger-level prompt appended to instructions when this trigger matches
    Example: "Prioritize concise replies for this trigger."

  - `modelId` (string,null)
    Model identifier (ai_models.model_id); must be enabled in this scope
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `uploadIds` (array)
    List of uploads (documents) attached to the bot
    Example: ["up_01hz1f0kw36f82k9s4nzpc4s92n"]

  - `dailyBudget` (integer,null)
    Daily budget in USD cents (null = unlimited)
    Example: 1000

  - `monthlyBudget` (integer,null)
    Monthly budget in USD cents (null = unlimited)
    Example: 10000

  - `rateLimitHourly` (integer,null)
    Maximum invocations per hour (null = unlimited)
    Example: 100

  - `rateLimitDaily` (integer,null)
    Maximum invocations per day (null = unlimited)
    Example: 1000

  - `role` (array)
    Role/instruction directives for the agent
    Example: ["Skeptical engineer"]

  - `personality` (array)
    Personality traits used when building agent instructions
    Example: ["Friendly","Fact-checking"]

  - `style` (array)
    Writing/response style directives
    Example: ["Clear paragraphs","Simple language"]

  - `behavior` (array)
    Behavior directives
    Example: ["Explain first","Ask clarifying questions"]

  - `prompt` (string,null)
    Additional free-form prompt/instructions
    Example: "Prioritize concise actionable guidance."

  - `resourceIds` (array)
    Group scope resource ids (group channels). Empty means whole group.
    Example: ["gc_01hz1f0kw36f82k9s4nzpc4s92n"]

## Response 200 fields (application/json):

  - `version` (integer, required)
    Newly created profile version number

## Response 400 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 401 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 403 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 404 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


